<template>
  <ga-form ref="formRef" :model="formData">
    <ga-form-item
      field="windows"
      label="Windows"
      label-col-flex="90px"
      :rules="[RULE.NOT_NULL]"
      :validate-trigger="['change', 'input']"
    >
      <ga-select size="small" v-model="formData.windows" placeholder="请选择内容">
        <ga-option v-for="item in jobList" :key="item.id" :value="item.id">
          {{ item.name }}
        </ga-option>
      </ga-select>
    </ga-form-item>
    <ga-form-item
      field="linux"
      label="Linux"
      label-col-flex="90px"
      :rules="[RULE.NOT_NULL]"
      :validate-trigger="['change', 'input']"
    >
      <ga-select size="small" v-model="formData.linux" placeholder="请选择内容">
        <ga-option v-for="item in jobList" :key="item.id" :value="item.id">
          {{ item.name }}
        </ga-option>
      </ga-select>
    </ga-form-item>
  </ga-form>
</template>
<script setup>
import { ref } from "vue";
import { RULE } from "@/constant/validators";
const formRef = ref(null);
const formData = defineModel();
defineProps({
  jobList: Array,
});
defineExpose({
  formRef,
  formData,
});
</script>
